package modelLag;


/**
 * Write a description of class Person here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Person {
    // instance variables
    private String name, address, city, phone;
    private int postalCode;

    /**
     * Constructor for objects of class Person
     */
    public Person(String name, String address, String city, int postalCode, String phone) {
        this.name = name;
        this.address = address;
        this.city = city;
        this.phone =phone;
        this.postalCode = postalCode;        
    }
    
    //set & get for name.
    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    
    //set & get for address.
    public void setAddress(String address) {
        this.address = address;
    }
    public String getAddress() {
        return address;
    }
    
    //set & get for city.
    public void setCity(String city) {
        this.city = city;
    }
    public String getCity() {
        return city;
    }
    
    //set & get for postalCode.
    public void setPostalCode(int postalCode) {
        this.postalCode = postalCode;
    }
    public int getPostalCode() {
        return postalCode;
    }
    
    //set & get for phonenumber.
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getPhone() {
        return phone;
    }
    
    public void printPersonInfo() {
        System.out.println("-------------------------------------------------"+"\n");
        System.out.println(" Name       :   "+ name+"\n");
        System.out.println(" Address    :   "+address+"\n");
        System.out.println(" City       :   "+city+"\n");
        System.out.println(" Post Code  :   "+postalCode+"\n");
        System.out.println(" Phone      :   "+phone+"\n");
        System.out.println("-------------------------------------------------"+"\n");
    }
}
